1. Field of the Invention
The present invention relates to a data protection system that controls security and/or protection of contents that are stored in a nonvolatile semiconductor memory. Particularly, the present invention relates to a circuit that controls a security function and/or a protection function, and that is applied to a nonvolatile semiconductor memory chip or a nonvolatile semiconductor memory mixed logic chip such as a microcomputer chip.
2. Description of the Related Art
A microcomputer system that is loaded with a flash memory has a function of controlling security and protection of storage contents of the nonvolatile semiconductor memory, in order to secure confidentiality of the contents stored in the nonvolatile memory and safe operation of the microcomputer system.
FIG. 13 is a block diagram that shows a part of a conventional example of a nonvolatile semiconductor memory that is loaded with security and protection functions.
The nonvolatile semiconductor memory comprises a memory circuit 10 having a nonvolatile (NV) memory matrix, a voltage detecting circuit (VDECT) 11, an oscillation circuit (OSC) 12 for generating a clock signal CLK, a security bit/protection bit storing circuit (SECPRT bit) 13, a read/write control circuit (R/W_CNT) 14 for the memory circuit, and a data bus (DB) 15.
FIG. 14 shows a circuit configuration of the SECPRT bit 13 in the nonvolatile semiconductor memory shown in FIG. 13.
The SECPRTbit 13 comprises an NV memory cell 131 that stores the security bit SEC therein and an NV memory cell 132 that stores the protection bit PRT therein.
Upon receiving an output enable control signal OE and a security command SECCMD that are supplied from the microcomputer system controller, the SECPRTbit 13 outputs a security bit SEC to a data bus DB1, and upon receiving a write enable control signal WE and a protection command PRTCMD that are supplied from the microcomputer system controller, the SECPRTbit 13 outputs a protection bit PRT to a data bus DB 0.
FIG. 15 shows a circuit configuration of the R/W_CNT 14 in the nonvolatile semiconductor memory shown in FIG. 13.
Upon receiving the security bit SEC outputted from the SECPRTbit 13, and a chip enable control signal CE and the output enable control signal OE that are supplied from the microcomputer system controller, the R/W_CNT 14 generates a read control signal RD, and upon receiving the protection bit PRT outputted from the SECPRTbit 13, and the chip enable control signal CE and a write enable control signal WE that are supplied from the microcomputer system controller, the R/W_CNT 14 generates a write control signal WR of the memory circuit 10.
FIG. 16 is a timing chart that shows an operation example at the time of turning on the nonvolatile semiconductor memory shown in FIG. 13.
When the power supply is turned on, the nonvolatile semiconductor memory shown in FIG. 13 determines permission or prohibition of reading from and writing into the memory circuit 10, based on a state of a security bit SEC and a state of a protection bit PRT within the SECPRT bit 13.
In other words, when the security bit SEC is “1” (a LOCK state), the memory prohibits reading from the memory circuit 10, and when the security bit SEC is “0” (an UNLOCK state), the memory permits reading from the memory circuit 10.
When the protection bit PRT is “1” (a LOCK state), the memory prohibits writing to the memory circuit 10, and when the protection bit PRT is “0” (an UNLOCK state), the memory permits writing to the memory circuit 10.
However, if the security bit SEC stored in the SECPRT bit 13 is “0” (the UNLOCK state) at the time when the power supply is turned on in the state that a chip enable control signal CE is “1”, a read control signal RD that is output from the R/W_CNT 14 becomes “1”. Therefore, data in the memory circuit 10 is erroneously read into the data bus DB (31: 0) 15.
That is, immediately after the power supply is turned on, a malfunction of the memory occurs that the data is read out. At the time of turning on the power supply, the reading of the security bit SEC becomes unstable. Therefore, there is a problem that the security function is lowered, and the data stored in the memory circuit 10 is leaked out.
If the protection bit PRT stored in the SECPRT bit 13 is “0” (the UNLOCK state) at the time when the power supply is turned on in the state that the chip enable control signal CE is “1”, a write control signal WR that is output from the R/W_CNT 14 becomes “1”. Therefore, data in the data bus DB (31: 0) 15 is erroneously written into the memory circuit 10. As a result, program data is destructed, and the system does not work.
As explained above, according to the conventional nonvolatile semiconductor memory or a conventional microcomputer system that is loaded with the nonvolatile semiconductor memory, data is read out erroneously from the memory and data is written erroneously into the memory, immediately after the turning on of the power supply. As a result, program data is destructed, and the system does not work.